introduce VariableArray class #321
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR further improves the diagnostics module:
Introduces a basic VariableArray class to carry around variable_keys and variable_names with an array containing posterior draws. This class is only meant for internal use for now and we can see if extending it in the future could be sensible.
Further improves posterior pairs plots to enable plotting the prior again.
For example, using the linear regression notebook, we can now do something like:
to show both posterior, prior, and the true parameter values. The previous implementation didn't quite work in terms of correctly showing the prior.
There is one issue which I couldn't quite resolve and I would like to get your input @stefanradev93 and @jerrymhuang: Currently, the posterior is always plotted behind the prior on the diagonal. I tried to change that via
hue_orderfor example but it either breaks the off diagonal plots or mislabels prior and posterior. It kind of looks like a bug in seaborn to me as I cannot imagine this to be intended. Any ideas would be highly appreciated.